package com.finance.entity;

import java.util.Date;

/**
 * 管理员及业务员
 * 
 * @author Administrator
 *
 */
public class User {
	/**
	 * 用户ID
	 */
	private String userId;

	/**
	 * 用户名字
	 */
	private String name;

	/**
	 * 电话
	 */
	private String phone;

	/**
	 * 密码
	 */
	private String password;

	/**
	 * 最后一次登陆时间
	 */
	private Date latestTime;

	/**
	 * 登陆ip
	 */
	private String landingIp;

	/**
	 * 创建时间
	 */
	private Date creationTime;
	
	private String createTime;

	/**
	 * 状态（1启用 -1停用）
	 */
	private Integer state;

	public String getStateName() {
		if (state == null) {
			return "未知";
		} else if (state == 1) {
			return "启用";
		} else if (state == 2) {
			return "停用";
		}
		return "未知";
	}

	/**
	 * 权限（1超级管理员 》》>>>2财务>>3业务员）
	 */
	private Integer jurisdiction;

	public String getRole() {
		if (jurisdiction == null) {
			return "未知";
		} else if (jurisdiction == 1) {
			return "超级管理员";
		} else if (jurisdiction == 2) {
			return "财务人员";
		} else if (jurisdiction == 3) {
			return "业务员";
		}
		return "未知";
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column user.user_id
	 *
	 * @return the value of user.user_id
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public String getUserId() {
		return userId;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column user.user_id
	 *
	 * @param userId
	 *            the value for user.user_id
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column user.name
	 *
	 * @return the value of user.name
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public String getName() {
		return name;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column user.name
	 *
	 * @param name
	 *            the value for user.name
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column user.phone
	 *
	 * @return the value of user.phone
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public String getPhone() {
		return phone;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column user.phone
	 *
	 * @param phone
	 *            the value for user.phone
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column user.password
	 *
	 * @return the value of user.password
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column user.password
	 *
	 * @param password
	 *            the value for user.password
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column user.latest_time
	 *
	 * @return the value of user.latest_time
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public Date getLatestTime() {
		return latestTime;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column user.latest_time
	 *
	 * @param latestTime
	 *            the value for user.latest_time
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public void setLatestTime(Date latestTime) {
		this.latestTime = latestTime;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column user.landing_ip
	 *
	 * @return the value of user.landing_ip
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public String getLandingIp() {
		return landingIp;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column user.landing_ip
	 *
	 * @param landingIp
	 *            the value for user.landing_ip
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public void setLandingIp(String landingIp) {
		this.landingIp = landingIp;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column user.creation_time
	 *
	 * @return the value of user.creation_time
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public Date getCreationTime() {
		return creationTime;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column user.creation_time
	 *
	 * @param creationTime
	 *            the value for user.creation_time
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public void setCreationTime(Date creationTime) {
		this.creationTime = creationTime;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column user.state
	 *
	 * @return the value of user.state
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public Integer getState() {
		return state;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column user.state
	 *
	 * @param state
	 *            the value for user.state
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public void setState(Integer state) {
		this.state = state;
	}

	/**
	 * This method was generated by MyBatis Generator. This method returns the
	 * value of the database column user.jurisdiction
	 *
	 * @return the value of user.jurisdiction
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public Integer getJurisdiction() {
		return jurisdiction;
	}

	/**
	 * This method was generated by MyBatis Generator. This method sets the
	 * value of the database column user.jurisdiction
	 *
	 * @param jurisdiction
	 *            the value for user.jurisdiction
	 *
	 * @mbggenerated Sat Feb 10 19:11:40 CST 2018
	 */
	public void setJurisdiction(Integer jurisdiction) {
		this.jurisdiction = jurisdiction;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
}